package com.jsb.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.jsb.mapper.SysLogMapper;
import com.jsb.model.SysLog;
import com.jsb.model.SysLogExample;

@Service
public class SysLogService{
	
	@Resource
	private SysLogMapper sysLogMapper;
	
	public void addSysLog(SysLog sysLog) {
		sysLogMapper.insertSelective(sysLog);
	}
	
	public void delSysLogById(String id) {
		sysLogMapper.deleteByPrimaryKey(id);
	}
	
	public void updateSysLog(SysLog sysLog) {
		sysLogMapper.updateByPrimaryKeySelective(sysLog);
	}
	
	public void updateSysLogByExample(SysLog sysLog,SysLogExample sysLogExample){
	    sysLogMapper.updateByExampleSelective(sysLog,sysLogExample);
	}
	
	public SysLog getSysLogById(String id) {
		return sysLogMapper.selectByPrimaryKey(id);
	}
	
	public List<SysLog> getPageSysLog(SysLogExample sysLogExample) {
		return sysLogMapper.selectPage(sysLogExample);
	}
	
	public int countSysLog(SysLogExample sysLogExample) {
		return sysLogMapper.countByExample(sysLogExample);
	}
	
	public List<SysLog> selectByExample(SysLogExample example){
	    return sysLogMapper.selectByExample(example);
	}
}
